package de.klingbeil.hhc.client.view;

import com.extjs.gxt.ui.client.Style.LayoutRegion;
import com.extjs.gxt.ui.client.Style.Scroll;
import com.extjs.gxt.ui.client.widget.LayoutContainer;
import com.extjs.gxt.ui.client.widget.layout.BorderLayout;
import com.extjs.gxt.ui.client.widget.layout.BorderLayoutData;
import com.google.gwt.user.client.ui.Widget;

import de.klingbeil.hhc.client.controller.ApplicationListController.ApplicationListView;

public class ApplicationListViewImpl implements ApplicationListView {

	private LayoutContainer rootContainer;

	public ApplicationListViewImpl() {
		rootContainer = new LayoutContainer(new BorderLayout());
		rootContainer.addStyleName("hhc-listView");
		rootContainer.setScrollMode(Scroll.AUTOY);
	}

	@Override
	public Widget getWidget() {
		return rootContainer;
	}

	@Override
	public void setContent(Widget widget) {
		BorderLayoutData center = new BorderLayoutData(LayoutRegion.CENTER);
		rootContainer.add(widget, center);
	}

}
